package ui;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;


public class RootMIDlet extends MIDlet{
	private Display display;
	
		public RootMIDlet(){
			display = Display.getDisplay(this);
			System.out.println("In Constructor()");
		}
		
		/*Called upon instanciation */
		public void startApp()
	    {
	        Displayable current = Display.getDisplay(this).getCurrent();
	        if(current == null)
	        {
	            AgentCreationScreen creationScreen = 
	            	new AgentCreationScreen(this, "Hello World.",display);
	            display.setCurrent(creationScreen);
	        }
	    }

		/* On pause */
	    public void pauseApp()
	    {
	    }

	    /*On destruction */
	    public void destroyApp(boolean b)
	    {
	    }


	    // A convenience method for exiting
	    void exitRequested()
	    {
	        destroyApp(false);
	        notifyDestroyed();
	    }
}
